package com.learn.project2.model.vo.admin.address;

import com.learn.project2.bean.MarketAddress;
import com.learn.project2.model.vo.admin.user.UserListVO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
/**
 * @description: 封装Address的响应数据
 * @author wxy
 * @date 2022-01-07 23:17
 * @version 1.0
 */
@NoArgsConstructor
@Data
public class AddressListVO {


    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<MarketAddress> list;

    public static AddressListVO data(long total, Integer pages, Integer limit, Integer page, List list) {
        AddressListVO addressListVO = new AddressListVO();
        addressListVO.setTotal((int) total);
        addressListVO.setPages(pages);
        addressListVO.setPage(page);
        addressListVO.setLimit(limit);
        addressListVO.setList(list);
        return addressListVO;
    }

}
